package apIExercise.exception;

public class ThrowDemo {
    public static void main(String[] args) {
        Student af=new Student();
        try {
            af.setAge(100);
            System.out.println("阿芬："+af.getAge()+"岁了");
        } catch (Exception e) {
            //e.printStackTrace();
            System.out.println("年龄不合法");
        }

    }
}
